﻿using UnityEngine;
using System.Collections;

public class SEvilSubmarine : MonoBehaviour {

	public float velox; 
	void Start () 
	{
	
	
	}

	void Update ()
	{
		transform.Translate(velox * Time.deltaTime, 0, 0);
		
		if(transform.position.x > 15)
		{
			transform.position = new Vector3(-4.8f, Random.Range (-1.8f, 0.8f) , 0);
		}
	}
}
